import requests
from flask import Flask, jsonify, abort, request
file_name = "med_inv_102.jpg"
image_path = "C:/Users/QIANGHAO/Desktop/JXLZ/OCR_medicalVoice/image_jpg/{}".format(file_name)
files = {"img":("med_inv_102.jpg",open(image_path,'rb'),{})}
import json
from predict import predictor

if __name__=="__main__":
    res = requests.request("POST",url="http://120.92.92.149:8289/annotation",data={"type":"1"},files = files)
    print(res.text)
    # orc_result = json.loads(res.text)
    #
    # result = predictor.api_predict(orc_result)
    # print(result)